//
//  eBookIndexer.h
//  Capstone Project
//
//  Created by Brian Gilreath on 12/7/10.
//  Copyright 2010 GilreathCapstone. All rights reserved.
//

@interface OH_FeBookIndexer : NSObject {
	NSMutableArray *OH_FeBookSet;
	NSURL *OH_FPlistFileURL;
	NSBundle *bundle;
}

@property (nonatomic, retain) NSMutableArray *OH_FeBookSet;
@property (nonatomic, retain) NSURL *OH_FPlistFileURL;
@property (nonatomic, retain) NSBundle *bundle;

// builds the initial index based on the plist file
-(void)OH_FLoadIndex;

// rebuilds the index catalog and saves the result to the plist file
-(void)OH_FRebuildIndex;

// checks to see if everything that is indexed is still present
-(BOOL)OH_FIndexCheck;

// unpacks all files that are not already decompressed
-(void)OH_FUnpackAllFiles;

// deletes original epub file and recompresses and saves the file
-(void)OH_FPackAllFiles;

// packs a particular file, overwrites file if it already exists
// returns -2 if there is not enough device storage
// returns -1 if the file does not exist
// returns 0 if successful
-(int)OH_FPackFile: (NSURL *) path: (NSURL *) toHere;

// unpacks a particular file, deletes file if it already exists and creates a new copy
// returns -2 if there is not enough device storage
// returns -1 if the file does not exist
// returns 0 if successful
-(int)OH_FUnpackFile: (NSURL *) path: (NSURL *) toHere;

@end
